﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
										xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
	<Style x:Key="CheckBoxFocusVisual">
		<Setter Property="Control.Template">
			<Setter.Value>
				<ControlTemplate>
					<Rectangle Stroke="{StaticResource whiteBrush}" Margin="-3" StrokeDashArray="1 2" RadiusX="2" RadiusY="2">
					</Rectangle>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<Style x:Key="{x:Type CheckBox}" TargetType="CheckBox">
		<Setter Property="SnapsToDevicePixels" Value="true"/>
		<Setter Property="OverridesDefaultStyle" Value="true"/>
		<Setter Property="FocusVisualStyle"	Value="{StaticResource CheckBoxFocusVisual}"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="CheckBox">
					<BulletDecorator Background="Transparent">
						<BulletDecorator.Bullet>
							<Border x:Name="Border" Width="14" Height="14" CornerRadius="0" Background="{StaticResource grayBrush}">
								<Path Width="7" Height="7" x:Name="CheckMark" SnapsToDevicePixels="False" Stroke="{StaticResource darkBrush}" StrokeThickness="2" Data="M0,0 L7,7 M0,7 L7,0"/>
							</Border>
						</BulletDecorator.Bullet>
						<ContentPresenter Margin="4,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Left" RecognizesAccessKey="True"/>
					</BulletDecorator>
					<ControlTemplate.Triggers>
						<Trigger Property="IsChecked" Value="false">
							<Setter TargetName="CheckMark" Property="Visibility" Value="Collapsed"/>
						</Trigger>
						<Trigger Property="IsChecked" Value="{x:Null}">
							<Setter TargetName="CheckMark" Property="Data" Value="M0,7 L7,0"/>
						</Trigger>
						<Trigger Property="IsMouseOver" Value="true">
							<Setter TargetName="Border" Property="Background" Value="{StaticResource lightGrayBrush}"/>
						</Trigger>
						<Trigger Property="IsPressed" Value="true">
							<Setter TargetName="Border" Property="Background" Value="{StaticResource lightToDarkToLightBrush}"/>
						</Trigger>
						<Trigger Property="IsEnabled" Value="false">
							<Setter Property="Foreground" Value="{StaticResource whiteBrush}"/>
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
</ResourceDictionary>